import * as cModule from "../libclass.so"


// Class
class HttpReq extends TestReq{
    constructor(method, url, headers) {
        super(method, url);
        this.headers = headers;
    }

    get_method() {
      return this.get("method");
    }

    get_url() {
      return this.get("url");
    }

    get_headers() {
        return this.headers;
    }
};


var http_req = new HttpReq("HEAD", "http://www.jd.com", ["HOST: www.jd.com", "Content-Type: \"text/plain\""]);
console.log(http_req.__proto__);

console.log("method=", http_req.get_method());
console.log("url=", http_req.get_url());
console.log("headers=", http_req.get_headers());

// http_req.close();
http_req = null;